import 'package:base_library/base_library.dart';
import 'package:flutter/material.dart';

class RegisterPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: RegisterBody(),
    );
  }
}

class RegisterBody extends StatelessWidget {
  @override
  Widget build(BuildContext context) {


    void registerOn() {

    }

    return Stack(
      children: <Widget>[
        Image.asset(Util.getImgPath('ic_login_bg'),
            package: BaseConstant.packageBase, fit: BoxFit.cover),
        Column(
          children: <Widget>[
            Expanded(child: Container()),
            Expanded(
                child: Container(
              margin: EdgeInsets.only(left: 15, right: 15, top: 20),
              child: Column(
                children: <Widget>[
                  LoginItem(
                    hintText: '用户名',
                    prefixIcon: Icons.person,
                  ),
                  Gaps.vGap10,
                  LoginItem(
                    hintText: '密码',
                    prefixIcon: Icons.lock,
                  ),
                  LoginItem(
                    hintText: '确认密码',
                    prefixIcon: Icons.lock,
                  ),
                  Gaps.vGap10,
                  RoundButton(
                    margin: EdgeInsets.only(top: 20),
                    text: '注册',
                    onPressed: registerOn,
                  )
                ],
              ),
            ))
          ],
        )
      ],
    );
  }
}
